package cn.nxnil.test.web.serivce.impl;

import cn.nxnil.test.web.dao.entity.Muser;
import cn.nxnil.test.web.dao.mapper.MuserMapper;
import cn.nxnil.test.web.serivce.MuserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class MuserServiceImpl implements MuserService {

    @Autowired
    private MuserMapper muserMapper;

    @Transactional(rollbackFor = Exception.class)
    @Override
    public void add(Muser muser)  {
        muserMapper.insert(muser);
        throw new RuntimeException("helloworld");
    }
}
